class NetDataHandler {

	private static enterTableAfterConnect = false;
	public static init() {
		NotificationManager.instance.registerMsg(HttpMessageTypeName.LOGIN, NetDataHandler.onLogin, NetDataHandler);

	}
	public static checkCode(obj): boolean {
		if (obj.code == 0) {
			// var ad: AlertData = new AlertData();
			// ad.title = "提示"
			// ad.desc = obj.msg;
			// UIManager.instance.showAlert(ad);
			return false;
		}
		else if (obj.code == -1) {
			UIManager.instance.showScene(GameLoginScene);
			SocketConnection.instance.setHeartBeat(false);
		}
		return true;
	}
	public static onLogin(info: NotificationInfo): void {
		var json = info.args;
		var obj = JSON.parse(json);
		if (NetDataHandler.checkCode(obj)) {

		}

	}


}